import { IBase } from "@/entities.base/base.entity/interfaces";

/**
 * 产品实体接口
 */
export interface IProduct extends IBase {
    /** 产品编号 */
    code: string;
    
    /** 产品名称 */
    name: string;
    
    /** 产品分类 */
    category?: string;
    
    /** 产品品牌 */
    brand?: string;
    
    /** 产品规格 */
    specification?: string;
    
    /** 产品单位 */
    unit: string;
    
    /** 产品描述 */
    description?: string;
    
    /** 产品图片URL */
    imageUrl?: string;
    
    /** 零售价格 */
    retailPrice: number;
    
    /** 会员价格 */
    memberPrice?: number;
    
    /** 成本价格 */
    costPrice?: number;
    
    /** 当前库存数量 */
    stockQuantity: number;
    
    /** 库存预警数量 */
    warningQuantity: number;
    
    /** 产品状态 */
    status: string;
    
    /** 是否推荐 */
    isRecommended: boolean;
    
    /** 产品标签 */
    tags?: string;
    
    /** 保质期（天数） */
    shelfLife?: number;
    
    /** 生产日期 */
    productionDate?: Date;
    
    /** 有效期至 */
    expiryDate?: Date;
}

/**
 * 创建产品DTO接口
 */
export interface ICreateProductDto {
    code: string;
    name: string;
    category?: string;
    brand?: string;
    specification?: string;
    unit?: string;
    description?: string;
    imageUrl?: string;
    retailPrice: number;
    memberPrice?: number;
    costPrice?: number;
    stockQuantity?: number;
    warningQuantity?: number;
    status?: string;
    isRecommended?: boolean;
    tags?: string;
    shelfLife?: number;
    productionDate?: Date;
    expiryDate?: Date;
}

/**
 * 更新产品DTO接口
 */
export interface IUpdateProductDto {
    name?: string;
    category?: string;
    brand?: string;
    specification?: string;
    unit?: string;
    description?: string;
    imageUrl?: string;
    retailPrice?: number;
    memberPrice?: number;
    costPrice?: number;
    stockQuantity?: number;
    warningQuantity?: number;
    status?: string;
    giftPoints?: number;
    isRecommended?: boolean;
    tags?: string;
    shelfLife?: number;
    productionDate?: Date;
    expiryDate?: Date;
}

/**
 * 产品查询DTO接口
 */
export interface IProductQueryDto {
    page?: string | number;
    pageSize?: string | number;
    name?: string;
    keyword?: string;
    category?: string;
    brand?: string;
    status?: string;
    isRecommended?: string | boolean;
    minPrice?: string | number;
    maxPrice?: string | number;
    inStock?: string | boolean;
} 